#! /bin/bash

working_home=`pwd`

if [ ! -d $working_home/wget-images ]; then
    mkdir $working_home/wget-images
fi
cd $working_home/wget-images

if [ $# -lt 1 ]; then

    images=`grep "https://jetstrap-site.s3.amazonaws.com/webfonts" "$working_home/css/common.css" |awk -F[\'] '{print $4}'`

    for image in $images
    do
         wget $image
    done

else

    while read line
    do
	wget $line
    done < $1
fi
